package cn.edu.jxyy.batistest.test;

import cn.edu.jxyy.batistest.mapper.UserMapper;
import cn.edu.jxyy.batistest.pojo.User;
import cn.edu.jxyy.batistest.utils.MyBatisUtils;
import org.apache.ibatis.session.SqlSession;

public class Part13_Delete {
    public static void main(String[] args) {
        SqlSession sqlSession = MyBatisUtils.getSession();
        UserMapper userMapper = sqlSession.getMapper(UserMapper.class);

        User user = userMapper.findById(14);
        userMapper.deleteUser(user.getUid());

        sqlSession.commit();
        sqlSession.close();
    }
}
